// 入口文件
import "./mock";
import Vue from "vue";
import App from "./App.vue";
import "./styles/global.less";
import router from "./router";
import showMessage from "./utils/showMessage";
import "./eventBus.js";

//注册全局指令
import vloading from "./directive/loading.js";
Vue.directive("loading", vloading);
Vue.prototype.$showMessage = showMessage;
new Vue({
  router,
  render: (h) => h(App),
}).$mount("#app");

import * as blogApi from "./api/blog.js";

// blogApi.getBlog(1).then((r) => {
//   console.log(r);
// });
blogApi
  .postComment({
    nickname: "nic",
    content: "评论文本",
    blogId: "123",
  })
  .then((r) => {
    console.log(r);
  });
